<template>
    <div class="device">
        <div class="device_div">
            <p class="device_div_p">{{ title }}</p>
            <p :class="colors == 0 ? 'blue device_div_p2' : 'device_div_p2'">{{ data }} <span
                    class="device_div_p2_span">{{ unit
                    }}</span></p>

        </div>
        <img class="device_img" :src="imageUrl" alt="">
    </div>
</template>

<script>
export default {
    props: ["data", "unit", "title", "imageUrl", "colors"]
}
</script>

<style lang="scss" scoped>
.device {
    width: 169px;
    height: 102px;
    position: relative;

    .device_img {
        position: absolute;
        top: 0;
        left: 0;
    }
}

.device_div {
    margin-left: 90px;
    padding-top: 20px;

    .device_div_p {
        font-family: Source Han Sans CN;
        font-weight: 400;
        font-size: 14px;
        color: #D0E5F5;
        margin: 0;
        padding: 0;
        margin-top: 10px;

    }

    .device_div_p2 {
        font-size: 16px;
        color: "#16FFFF";
        margin: 0;
        padding: 0;
        margin-top: 10px;
        color: #16FFFF;
        .device_div_p2_span {
            font-size: 12px;
        }
    }

    .blue {
        color: #00C6FF;
    }

}
</style>